<template>
	<div>
		<template v-if="type == 'radio'">
			<el-radio v-for="item in dicData" :key="item.value" :label="item.label" size="large" :value="item.value"></el-radio>
		</template>
		<template v-else-if="type == 'checkbox'">
			<el-checkbox v-for="item in dicData" :key="item.value" :label="item.label" :value="item.value" size="large"></el-checkbox>
		</template>
		<template v-else-if="type == 'select'">
			<el-option v-for="item in dicData" :key="item.value" :label="item.label" :value="item.value" />
		</template>
	</div>
</template>

<script setup lang="ts">
type optionType = {
	label: string
	value: string
}
defineProps({
	type: String,
	dicData: {
		type: Array<optionType>,
		default: () => [],
	},
})
</script>

<style scoped></style>
